package com.yuanyefu.Introduction;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Administrator on 2017/9/17 0017.
 */
public class Main {
    public static void main(String[] args){
        ApplicationContext context = new ClassPathXmlApplicationContext("/introduction/config.xml");
        User user= (User) context.getBean("user");
        System.out.println(user.getEmail());
        ((Mutable)user).setReadonly(true);
        System.out.println(((Mutable)user).getReadonly());
        user.setEmail("new-email@abc.xyz");
        System.out.println(user.getEmail());
    }
}
